﻿@model HomeCareLibrary.Models.UserDetailIDModel

 @Html.HiddenFor(m => m.app_mo_alert_badge)
                                                @Html.HiddenFor(m => m.app_mo_alert_popup)
                                                @Html.HiddenFor(m => m.app_mo_alert_week)
                                                @Html.HiddenFor(m => m.app_mo_alert_day)
                                                @Html.HiddenFor(m => m.app_mo_alert_hour)
 
<div class="col-lg-9 col-sm-9 right_part">
            <div class="personalization-page admin-monthly-alertPage">
              <div class="flipbox-container box100">
                <div id="flipbox" class="flipbox">
                  
                  <div class="main-content">
                    <div class="personalization-content no-padding">
                      <div class="personalization-bg">
                        <div class="personalization-inn">
                            
                                <div class="personalization-data admin-monthly-alert">
                                <br />
                                  <h3 class="personalization-heading">Update Your <br /> Monthly Alert </h3>
                                 
                                     @if (Session[HomeCareLibrary.Constants.SessionConstants.MODE] == null)
                                                    {
                                     
                                     }

                                     else if (Session[HomeCareLibrary.Constants.SessionConstants.MODE].ToString() == "iphoneApp" || Session[HomeCareLibrary.Constants.SessionConstants.MODE].ToString() == "androidApp")
                                                   
                                     { 
                                    
                                     <p class="top-data">How do you want to be notified when your<br /> monthly personalized home care<br /> reminders &amp; tips are ready?</p>
                                  <div class="Dwelling-part">
                                    <div class="form-per">
                                      <form role="form">
                                        <div class="form-checkbox">
                                         <div id="update" class="update text-center" style="display:none;">
                                            <label class="red">
                                              updated </label>
                                          </div>
                                          <div class="checkbox">
                                            <label>
                                               <input type="checkbox" id="chkMob_BadgeAlert_WebView">
                                              Badge </label>
                                          </div>
                                          <div class="checkbox">
                                            <label>
                                              <input type="checkbox" id="chkMob_PopupAlert_WebView">
                                              Alerts </label>
                                          </div>
                                        

                                            @if (!String.IsNullOrEmpty(Model.web_mo_alert_email))
                                                                    {

                                          <div class="checkbox checkbox-email">
                                            <label>
                                              <input type="checkbox">
                                                <input type="checkbox" id="chkweb_mo_alert_email_WebView">
                                              Email</label>
                                           
                                               @Html.TextBoxFor(m => m.web_mo_alert_email, new { @id = "moweb_mo_alert_email_WebView", @class = "form-control" })
                                          </div>
                                              }

                                        </div>
                                        <div class="form-group">
                                          <label for="country">Week of the month:</label>
                                          @Html.DropDownList("getWeekoftheMonth", null, new { @class = "form-control",@id="getWeekoftheMonth_WebView" })
                                        </div>
                                        <div class="form-group">
                                          <label for="state">Day of that week:</label>
                                           @Html.DropDownList("getDayoftheWeek", null, new { @class = "form-control",@id="getDayoftheWeek_WebView" })
                                        </div>
                                        <div class="form-group">
                                          <label for="state">Time of that day:</label>
                                           @Html.DropDownList("getTimeoftheDay", null, new { @class = "form-control",@id="getTimeoftheDay_WebView" })
                                             @Html.Hidden("hdnUpdatePriority", @Url.Action("UpdatePriority", "Personalization"))
                                                         @Html.Hidden("hdnUserID", @Model.user_id)
                                        </div>
                                      </form>
                                    </div>
                                  </div>
                                  }
                                </div>
                                
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
    <div id="wait" style="display:none;width:100%;z-index: 999;height:100%;position:absolute;top:0; bottom:0;left:0; right:0;padding:2px;background-color: rgba(0, 0, 0, 0.4);">
                    <div style="width: 86px; margin: 27% auto 0px;"><img style="" src='@Url.Content("~/images/demo_wait.gif")'  /><br>Loading..</div></div>
          </div>
  @section script {

   @* <script src="@Url.Content("~/js/webview/adminmonthlyalert.js")" type="text/javascript"></script>*@


        @Scripts.Render("~/Scripts/BundledScriptsAdminMonthlyAlert")

      <script type="text/javascript">
      function isValidEmailAddress(emailAddress) {
    var pattern = new RegExp(/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i);
    return pattern.test(emailAddress);
      }
          </script>
      }

